version 14.0
log using "\Users\sgolder\Dropbox\Portfolio Allocation\replication\ariottigolder-descriptive2.log", replace
set more off
#delimit ;

*     ***************************************************************** *;
*     ***************************************************************** *;
*       File-Name:      ariotti_golder-descriptive2.do                  *;
*       Date:           September 9, 2016                               *;
*       Author:         Molly Ariotti and Sona Golder                   *;
*       Purpose:      	Get some descriptive data.                      *;
* 	    Input File:     Africa_govt_majority_status.dta                 *;
*       Output File:    ariottigolder-descriptive2.log                  *;
*       Data Output:    Africa_govt_descriptive2.dta                    *;             
*       Previous file:  Africa_govt_majority_status.dta.xls             *;
*                        --> Stata .dta                                 *;
*       Machine:        laptop                           				*;
*     ****************************************************************  *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*       Open and summarize dataset. Generate some variables.            *;
*     ****************************************************************  *;

use "C:\Users\sgolder\Dropbox\Portfolio Allocation\replication\Africa_govt_majority_status.dta";

*     ****************************************************************  *;
*       Label variables                                                 *;
*     ****************************************************************  *;

label var countryname "country name";
label var countrycode "country code";
label var cabinetcode "cabinet code";
label var cowcode "cow code";
label var year "year in which government begins";
label var presidential "1 = presidential, 0 = parliamentary"; 
label var party "party number or acronym";
label var formateur "1 = formateur, 0 = otherwise";
label var portfolios "number of portfolios per party";
label var government_portfolios "number of portfolios in the government";
label var party_seats "number of legislative seats per party";
label var government_seats "number of seats controlled by government";
label var region "1=Africa, 2=Western Europe, 3=Latin America";
label var leg_size "total number of seats in legislature";
label var govt_legseatshare "percentage of leg seats controlled by govt";

sum;

desc;

*     ****************************************************************  *;
*      Get some descriptive statistics about govt_legseatshare, with    *;
*      all cases and then excluding the 2 govts without partisan        *;
*      formateurs (b/c they are dropped from the analyses in the paper  *;
*     ****************************************************************  *;

sum govt_legseatshare;
sum govt_legseatshare if presidential==0;
sum govt_legseatshare if presidential==1;

ttest govt_legseatshare, by(presidential) unequal;

sum govt_legseatshare if formateur==1;
sum govt_legseatshare if presidential==0 & formateur==1;
sum govt_legseatshare if presidential==1 & formateur==1;

ttest govt_legseatshare if formateur==1, by(presidential) unequal;

*     ****************************************************************  *;
*      Get some descriptive statistics about majority and minority      *;
*      governments for govts in analyses (w/ partisan formateurs)       *;
*     ****************************************************************  *;

sum govt_legseatshare if govt_legseatshare<50 & formateur==1;
sum govt_legseatshare if govt_legseatshare>=50 & formateur==1;

list countryname year presidential govt_legseatshare if govt_legseatshare<50 & formateur==1;

save "C:\Users\sgolder\Dropbox\Portfolio Allocation\replication\Africa_govt_descriptive2.dta", replace;

log close;
exit;
